package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WageSlipInfoMapper;
import com.ruoyi.system.domain.WageSlipInfo;
import com.ruoyi.system.service.IWageSlipInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 工资条信息Service业务层处理
 * 
 * @author 管鸿影
 * @date 2024-12-08
 */
@Service
public class WageSlipInfoServiceImpl extends ServiceImpl<WageSlipInfoMapper,WageSlipInfo> implements IWageSlipInfoService

{
    @Autowired
    private WageSlipInfoMapper wageSlipInfoMapper;

    /**
     * 查询工资条信息
     * 
     * @param wageSlipId 工资条信息主键
     * @return 工资条信息
     */
    @Override
    public WageSlipInfo selectWageSlipInfoByWageSlipId(Long wageSlipId)
    {
        return wageSlipInfoMapper.selectWageSlipInfoByWageSlipId(wageSlipId);
    }

    /**
     * 查询工资条信息列表
     * 
     * @param wageSlipInfo 工资条信息
     * @return 工资条信息
     */
    @Override
    public List<WageSlipInfo> selectWageSlipInfoList(WageSlipInfo wageSlipInfo)
    {
        return wageSlipInfoMapper.selectWageSlipInfoList(wageSlipInfo);
    }

    /**
     * 新增工资条信息
     * 
     * @param wageSlipInfo 工资条信息
     * @return 结果
     */
    @Override
    public int insertWageSlipInfo(WageSlipInfo wageSlipInfo)
    {
        wageSlipInfo.setCreateTime(DateUtils.getNowDate());
        return wageSlipInfoMapper.insertWageSlipInfo(wageSlipInfo);
    }

    /**
     * 修改工资条信息
     * 
     * @param wageSlipInfo 工资条信息
     * @return 结果
     */
    @Override
    public int updateWageSlipInfo(WageSlipInfo wageSlipInfo)
    {
        wageSlipInfo.setUpdateTime(DateUtils.getNowDate());
        return wageSlipInfoMapper.updateWageSlipInfo(wageSlipInfo);
    }

    /**
     * 批量删除工资条信息
     * 
     * @param wageSlipIds 需要删除的工资条信息主键
     * @return 结果
     */
    @Override
    public int deleteWageSlipInfoByWageSlipIds(String wageSlipIds)
    {
        return wageSlipInfoMapper.deleteWageSlipInfoByWageSlipIds(Convert.toStrArray(wageSlipIds));
    }

    /**
     * 删除工资条信息信息
     * 
     * @param wageSlipId 工资条信息主键
     * @return 结果
     */
    @Override
    public int deleteWageSlipInfoByWageSlipId(Long wageSlipId)
    {
        return wageSlipInfoMapper.deleteWageSlipInfoByWageSlipId(wageSlipId);
    }
}
